package com.lagou.controller;

import com.lagou.service.ArticleService;
import com.lagou.service.PageRequest;
import com.lagou.service.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {
    @Autowired
    ArticleService articleService;
    @RequestMapping("/toLoginPage")
    public Object toLoginPage(){
        PageRequest pageQuery  = new PageRequest();
        pageQuery.setPageNum(1);
        pageQuery.setPageSize(10);
        PageResult page = articleService.findPage(pageQuery);
        return page;
    }


}
